package org.bioversityinternational.mgbms.model.domain;

// Generated 13 oct. 2011 12:11:05 by Hibernate Tools 3.4.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * Activity generated by hbm2java
 */
@Entity
@Table(name = "Activity", schema = "dbo", catalog = "imgbms")
public class Activity implements java.io.Serializable {

	private int id;
	private ActivityType activityType;
	private Boolean hasActTag;
	private Integer proPhase;
	private Date startDate;
	private Date endDate;
	private String comments;
	private Set<BacteriaTestTag> bacteriaTestTags = new HashSet<BacteriaTestTag>(
			0);
	private Set<AccessionActivity> accessionActivities = new HashSet<AccessionActivity>(
			0);
	private Set<PreIndexingTag> preIndexingTags = new HashSet<PreIndexingTag>(0);
	private Set<PreIndexingResultTag> preIndexingResultTags = new HashSet<PreIndexingResultTag>(
			0);
	private Set<Treatment> treatments = new HashSet<Treatment>(0);
	private Set<ActivityMaterial> activityMaterials = new HashSet<ActivityMaterial>(
			0);

	public Activity() {
	}

	public Activity(int id) {
		this.id = id;
	}

	public Activity(int id, ActivityType activityType, Boolean hasActTag,
			Integer proPhase, Date startDate, Date endDate, String comments,
			Set<BacteriaTestTag> bacteriaTestTags,
			Set<AccessionActivity> accessionActivities,
			Set<PreIndexingTag> preIndexingTags,
			Set<PreIndexingResultTag> preIndexingResultTags,
			Set<Treatment> treatments, Set<ActivityMaterial> activityMaterials) {
		this.id = id;
		this.activityType = activityType;
		this.hasActTag = hasActTag;
		this.proPhase = proPhase;
		this.startDate = startDate;
		this.endDate = endDate;
		this.comments = comments;
		this.bacteriaTestTags = bacteriaTestTags;
		this.accessionActivities = accessionActivities;
		this.preIndexingTags = preIndexingTags;
		this.preIndexingResultTags = preIndexingResultTags;
		this.treatments = treatments;
		this.activityMaterials = activityMaterials;
	}

	@Id
	@Column(name = "id", unique = true, nullable = false)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "activityTypeId")
	public ActivityType getActivityType() {
		return this.activityType;
	}

	public void setActivityType(ActivityType activityType) {
		this.activityType = activityType;
	}

	@Column(name = "hasActTag")
	public Boolean getHasActTag() {
		return this.hasActTag;
	}

	public void setHasActTag(Boolean hasActTag) {
		this.hasActTag = hasActTag;
	}

	@Column(name = "proPhase")
	public Integer getProPhase() {
		return this.proPhase;
	}

	public void setProPhase(Integer proPhase) {
		this.proPhase = proPhase;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "startDate", length = 23)
	public Date getStartDate() {
		return this.startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "endDate", length = 23)
	public Date getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	@Column(name = "comments", length = 1024)
	public String getComments() {
		return this.comments;
	}

	public void setComments(String comments) {
		this.comments = comments;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "activity")
	public Set<BacteriaTestTag> getBacteriaTestTags() {
		return this.bacteriaTestTags;
	}

	public void setBacteriaTestTags(Set<BacteriaTestTag> bacteriaTestTags) {
		this.bacteriaTestTags = bacteriaTestTags;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "activity")
	public Set<AccessionActivity> getAccessionActivities() {
		return this.accessionActivities;
	}

	public void setAccessionActivities(
			Set<AccessionActivity> accessionActivities) {
		this.accessionActivities = accessionActivities;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "activity")
	public Set<PreIndexingTag> getPreIndexingTags() {
		return this.preIndexingTags;
	}

	public void setPreIndexingTags(Set<PreIndexingTag> preIndexingTags) {
		this.preIndexingTags = preIndexingTags;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "activity")
	public Set<PreIndexingResultTag> getPreIndexingResultTags() {
		return this.preIndexingResultTags;
	}

	public void setPreIndexingResultTags(
			Set<PreIndexingResultTag> preIndexingResultTags) {
		this.preIndexingResultTags = preIndexingResultTags;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "activity")
	public Set<Treatment> getTreatments() {
		return this.treatments;
	}

	public void setTreatments(Set<Treatment> treatments) {
		this.treatments = treatments;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "activity")
	public Set<ActivityMaterial> getActivityMaterials() {
		return this.activityMaterials;
	}

	public void setActivityMaterials(Set<ActivityMaterial> activityMaterials) {
		this.activityMaterials = activityMaterials;
	}

}
